package oop.Demo05;
//学生 is 人
public class Student extends Person {
    public Student() {
        //隐藏代码，调用了父类的无参构造
        super();//调用父类的构造器的第一行必须在子类构造器的第一行
        System.out.println("student 无参执行");
    }

    private String name="kml1";
    public void print(){
        System.out.println("student");
    }
    public void test2(){
        print();
        this.print();


    }

    public void test1(String name){
        System.out.println(name);
        System.out.println(this.name);
        System.out.println(super.name);
    }
}
